package com.zoo.diannaopeijian.service;

import com.zoo.diannaopeijian.comm.page.Page;
import com.zoo.diannaopeijian.domain.Stock;
import com.zoo.diannaopeijian.domain.Ware;
import com.zoo.diannaopeijian.domain.Warehouse;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;
import java.util.List;
import java.util.Map;

/**
 * Created by zx583 on 2018-01-27.
 */
public interface StockService {
    public boolean insertStock(Stock stock);

    public boolean addStock(Stock stock);

    public boolean reduceStock(Stock stock);

    @Transactional
    public boolean reduceStocks(List<Stock> stocks);

    public boolean addStocks(List<Stock> stocks);

    public boolean updateStock(Stock stock);

    public List<Map> getWareStock(Integer componentid,
                                  Integer componentparameterdetailid,
                                  Integer warehouseid,
                                  Ware ware
                                  );

    public List<Map> getWareStockWithPage(Page page, Integer componentid,
                                      Integer componentparameterdetailid,
                                      Integer warehouseid,
                                      Ware ware);

    public List<Map> getFuzzyWareStock(Integer componentid,
                                       Integer componentparameterdetailid,
                                       Integer warehouseid,
                                       Ware ware);

    public List<Map> getFuzzyStockWithPage(Page page, Integer componentid,
                                           Integer componentparameterdetailid,
                                           Integer warehouseid,
                                           Ware ware);

    Integer getStockNum(Stock stock);
}
